home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
diskutil
/
fdf.zoo
/
elib.zoo
/
delete.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-16
|
436b
|
24 lines
#include <osbind.h>
/*
* delete_file
*
* given the name of a file, attempt to delete it and return zero on success,
* non-zero if not. 'force' parameter, if non-zero, will try to change the
* mode of a file from read-only to delete it.
*/
int delete_file(char *file, char force)
{
if (force) {
int mode;
if ((mode = Fattrib(file, 0, 0)) & FA_RDONLY)
Fattrib(file, 1, mode&(!FA_RDONLY));
}
return Fdelete(file);
}